<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/pages/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>添加新闻</title>
<script type="text/javascript">
function checkForm(){
	var title=document.getElementById("proModel").value;
	var content=document.getElementById("content").value;
	if(title==null||title==""){
		alert("请输入新闻标题！");
		return false;
		};
	if(content==null||content==""){
		alert("请输入新闻内容！");
		return false;
					}
		return true;
	
}

</script>
</head>
<body>
<div id="titleDiv" class="x-panel-header">添加新闻</div>
<div id="bodyDiv">
<div id="toolbarDiv" class="x-toolbar"><!-- 此处是工具栏    注3-->

</div>
<div id="toolbarDiv" class="x-toolbar"></div>
<div id="panelBodyDiv" class="x-panel-body"><!-- 此处是主体部分    注4-->
<form id="proForm" name="newsForm" method="post" target="_self" action="${ctx}/news.do?method=insertNews" onsubmit="return checkForm();" enctype="multipart/form-data">
<table width="100%" class="datatable">
	<tr>
		<th align="right" width="15%">新闻标题：</th>
		<td align="left"><input type="text" size="45"
			name="news.newsTitle" id="proModel" />
		</td>
	</tr>
	<tr>
		<th align="right" width="15%">新闻内容：</th>
		<td align="left">
			<textarea rows="6" cols="60" name="news.newsContent" id="content"></textarea>
			</td> 
	</tr>
	<tr>
		<th></th>
		<td align="center"><input type="submit" value="提交"/>
		&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" value="重置" />
		</td>
	</tr>
</table>
</form>
</div>
</div>
</body>
</html>